/*
 *  MESEventBlock.h
 *  MESLib
 * 
 * Created by William Carey on 5/9/09.
 * Copyright 2009 Starline Software.
 * 
 * This file is part of MESLib.
 * 
 * MESLib is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * MESLib is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with MESLib. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef MES_EVENT_BLOCK
#define MES_EVENT_BLOCK

#include <string>
#include <vector>

typedef std::string MESActor_t;
typedef std::string MESAction_t;
typedef int MESTime_t;

typedef uint16_t Err_t;
const Err_t NoErr = 0;

class MESLink;

class MESEventBlock {
public:
	MESEventBlock();
	MESEventBlock(const MESEventBlock& b);
	
	MESEventBlock(const MESActor_t& actor, const MESAction_t& action);
	
	~MESEventBlock();
	
	Err_t SetActor(const MESActor_t& actor);
	Err_t SetAction(const MESAction_t& action);
	
	Err_t SetStart(const MESTime_t& start);
	Err_t SetEnd(const MESTime_t& end);
	
	const MESActor_t& GetActor() const;
	const MESAction_t& GetAction() const;
	
	const MESTime_t& GetStart() const;
	const MESTime_t& GetEnd() const;
	
	const size_t GetNumLinks() const;
	std::vector<MESLink *>& GetLinks();
	
	
private:
	std::vector<MESLink *> links_;
	
	MESActor_t actor_;
	MESAction_t action_;
	MESTime_t start_;
	MESTime_t end_;
};

#endif